-- GENERATED SPELL FOR [Horde Berserker] --


function spell0_26799(pUnit, Event) --@Bloodlust,n/a--
pUnit:FullCastSpellOnTarget(21049,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_26799', 30337, 1)
end

function spell1_26799(pUnit, Event) --@Frenzy,Self--
pUnit:FullCastSpellOnTarget(47774,pUnit)
pUnit:RegisterEvent('Sorts_26799', 592, 1)
end

function spell2_26799(pUnit, Event) --@War Stomp,Self--
pUnit:FullCastSpellOnTarget(38682,pUnit)
pUnit:RegisterEvent('Sorts_26799', 599, 1)
end

function Sorts_26799(pUnit, Event)
local choix_sorts_26799 = math.random(0, 2)
if choix_sorts_26799 == 0 then
pUnit:RegisterEvent('spell0_26799', 1, 1)
end
if choix_sorts_26799 == 1 then
pUnit:RegisterEvent('spell1_26799', 1, 1)
end
if choix_sorts_26799 == 2 then
pUnit:RegisterEvent('spell2_26799', 1, 1)
end
end

function mob26799_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_26799', math.random(1500, 3000), 1)
end

function mob26799_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26799_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob26799_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(26799, 1, 'mob26799_Action')
RegisterUnitEvent(26799, 2, 'mob26799_Leave')
RegisterUnitEvent(26799, 3, 'mob26799_Kill')
RegisterUnitEvent(26799, 4, 'mob26799_Die')
